package yxy.cherry.battle.module.record.stream;

/**
 * @author James
 * 失效buff
 * @date 2022/2/21 11:57
 **/

import yxy.cherry.battle.Fighter;
import yxy.cherry.battle.module.affix.Buff;

import java.util.ArrayList;
import java.util.Collection;

/** 失效BUFF */
public class RecordStream_BFA extends RecordStream {

	private Fighter actor;
	private ArrayList<String> buffCodes = new ArrayList<>();
	private ArrayList<String> buffCodeSeqs = new ArrayList<>();

	public RecordStream_BFA(Fighter actor, Collection<Buff> buffList) {
		this.actor = actor;

		for (Buff buff:buffList){
			buffCodes.add(buff.getBuffCode());
			buffCodeSeqs.add(buff.getBuffCodeSeq());
		}

	}

	@Override
	protected void _record() {
		sb().append("#BFA");
		sb().append("|");
		sb().append(actor.getFighterPosition().code());
		sb().append("|");
		sb().append(buffCodes.toString());
		sb().append("|");
		sb().append(buffCodeSeqs.toString());
		sb().append(";");
	}

}
